package spring_02_di.diTest;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import spring_02_di.di.Person;

public class PersonSetTest1 {
	//利用 构造函数 给对象赋值
    @Test
    public void testConstrutor(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Person person = (Person) context.getBean("person_con");
        System.out.println(person.getPid());//1
    }
}
